package com.foreveross.dao.imp;

import java.util.List;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.foreveross.common.SQLUtil;
import com.foreveross.dao.CommonDAO;
import com.foreveross.dao.DDManagerDAO;
import com.foreveross.vo.ExpressCompany;
import com.foreveross.vo.HrCode;
import com.foreveross.vo.ProductType;
@Component("commonDAO")
public class CommonDAOImp extends SQLUtil implements CommonDAO {	
	
	public List<String> findAllImgUrl() throws Exception {
		StringBuffer sqlString = new StringBuffer(" SELECT url url FROM house_repair where url is not null and url <> '' ");
		sqlString.append(" union all ");
		sqlString.append(" SELECT url url FROM hr_houses where url is not null and url <>'' ");
		sqlString.append(" union all ");
		sqlString.append(" SELECT image url FROM hr_news_info where image is not null and image <>'' ");
		sqlString.append(" union all ");
		sqlString.append(" SELECT content_img_list url FROM hr_news_info where content_img_list is not null  and content_img_list <>'' ");
		sqlString.append(" union all ");
		sqlString.append(" SELECT image url FROM house_lease where image is not null and image <>'' ");
		sqlString.append(" union all ");
		sqlString.append(" SELECT image url FROM hr_optimized where image is not null and image <>'' ");
		sqlString.append(" union all ");
		sqlString.append(" SELECT content_img_list url FROM hr_optimized where content_img_list is not null  and content_img_list <>'' ");
		sqlString.append(" union all ");
		sqlString.append(" SELECT image url FROM hr_favorable where image is not null and image <>'' ");
		sqlString.append(" union all ");
		sqlString.append(" SELECT content_img_list url FROM hr_favorable where content_img_list is not null  and content_img_list <>'' ");

		return (List<String>)findObejctBySQL(sqlString.toString(),null);
	}
	

}
